antiblock: Update to 2.1.1
authorKhachatryan Karen <[email protected]>
Mon, 24 Mar 2025 10:50:41 +0000 (13:50 +0300)
committerHannu Nyman <[email protected]>
Mon, 24 Mar 2025 16:34:22 +0000 (18:34 +0200)
1) Fixed a bug that not all routers were deleted.
2) Log updated.
3) The "output" option has been removed from the service, it is now /tmp/antiblock

Signed-off-by: Khachatryan Karen <[email protected]>
net/antiblock/Makefile
net/antiblock/files/etc/config/antiblock
net/antiblock/files/etc/init.d/antiblock

index 47b165947664fe506fbed422d082131dbaf5e1fb..4ddd9fd030bdc185340a9b904ae142ffd0b488f5 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=antiblock
-PKG_VERSION:=2.1.0
+PKG_VERSION:=2.1.1
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/karen07/antiblock
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=898e06eb32a6617e731a1777845c7d59f70fff24ab7a931209fc1065eb119fbd
+PKG_MIRROR_HASH:=61183b8c4710896dde95fc4ca065a31224161bfc98c6040ca93950ef190afc53
 
 PKG_MAINTAINER:=Khachatryan Karen <[email protected]>
 PKG_LICENSE:=GPL-3.0-or-later
index 471eb3ba78315e5407739086f4776e997b702f49..11f174a9d181ec72544d93c334de848be2bcb70b 100644 (file)
@@ -5,7 +5,6 @@
 #Optional parameters:
        #option log                       '1'
        #option stat              '1'
-       #option output            '/test/'
        #list blacklist           'x.x.x.x/xx'
        #list blacklist           'x.x.x.x/xx'
 
index 0bccffa44bd3a2b08c7eb9a815c1dfe1aa73f72f..981e31b2715971f68f1e6a78489b1c2e58d761f0 100644 (file)
@@ -4,8 +4,8 @@ USE_PROCD=1
 START=99
 
 prog_name="antiblock"
-blacklist_folder="/tmp/$prog_name"
-blacklist_file="$blacklist_folder/blacklist"
+tmp_folder="/tmp/$prog_name"
+blacklist_file="$tmp_folder/blacklist"
 
 routes_parse() {
        local _config="$1"
@@ -20,7 +20,7 @@ routes_parse() {
 }
 
 blacklist_parse() {
-       [ "${_blacklist_count}" -eq "0" ] && mkdir -p $blacklist_folder && >$blacklist_file
+       [ "${_blacklist_count}" -eq "0" ] && mkdir -p $tmp_folder && >$blacklist_file
        _blacklist_count=$(expr "${_blacklist_count}" + 1)
        echo "$1" >>$blacklist_file
 }
@@ -34,12 +34,10 @@ start_service() {
 
        echo "AntiBlock start"
 
-       local _output
        local _log
        local _stat
        local _test
 
-       config_get _output "config" "output"
        config_get_bool _log "config" "log" "0"
        config_get_bool _stat "config" "stat" "0"
        config_get_bool _test "config" "test" "0"
@@ -59,10 +57,10 @@ start_service() {
        _listen="$(uci -q get network.lan.ipaddr):53"
        procd_append_param command -l "${_listen}"
 
-       [ -n "${_output}" ] && mkdir -p "${_output}" && procd_append_param command -o "${_output}"
+       procd_append_param command -o "$tmp_folder"
        [ "${_blacklist_count}" -ne "0" ] && procd_append_param command -b "$blacklist_file"
-       [ "${_log}" -ne "0" ] && procd_append_param command --log
-       [ "${_stat}" -ne "0" ] && procd_append_param command --stat
+       [ "${_log}" -ne "0" ] && mkdir -p $tmp_folder && procd_append_param command --log
+       [ "${_stat}" -ne "0" ] && mkdir -p $tmp_folder && procd_append_param command --stat
        [ "${_test}" -ne "0" ] && procd_append_param command --test
 
        procd_close_instance